CSharpTest.Net
TryRemove Method
See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Collections Namespace > IDictionaryEx<TKey,TValue> Interface : TryRemove Method

key
The key of the element to remove.
value
The value that was removed.

Glossary Item Box

Removes the element with the specified key from the IDictionary.

Syntax

Visual Basic (Declaration) 
Function TryRemove( _
   ByVal key As TKey, _
   ByRef value As TValue _
) As Boolean
C# 
bool TryRemove( 
   TKey key,
   out TValue value
)

Parameters

key
The key of the element to remove.
value
The value that was removed.

Return Value

true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original IDictionary.

Exceptions

ExceptionDescription
System.NotSupportedExceptionThe IDictionary is read-only.

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys